# Maintainer: David Runge <dvzrv@archlinux.org>

pkgname=patchmatrix
pkgver=0.26.0
pkgrel=2
pkgdesc="A JACK patchbay in flow matrix style"
arch=(loong64 x86_64)
url="https://git.open-music-kontrollers.ch/~hp/patchmatrix"
license=(Artistic2.0)
groups=(
  lv2-plugins
  pro-audio
)
depends=(
  glibc
  hicolor-icon-theme
  libglvnd
  libx11
)
makedepends=(
  glew
  glu
  jack
  lv2
  meson
)
source=(
  $pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz
  $pkgname-$pkgver.tar.gz.asc::$url/archive/$pkgver.tar.gz.asc
)
sha512sums=('35e6434002082c4279ef410da64565770271af8da7802118ef80f95eeace81a51a98c1aca23c21f4e2b8e043c16f516a6083c92afa06da6d8edfc30708cc3fab'
            'SKIP')
b2sums=('bfab88b9300e834fa6bf6a72a6a760140f540e0a6d1f5d099ba3eecf06c37f7377951d0b1b997ba4fa00166974e9be57ecd322f345bb02449a8290274bf71afc'
        'SKIP')
validpgpkeys=('5AE26CEBBF49705C19FB273A30258F99258CB76A') # Hanspeter Portner <dev@open-music-kontrollers.ch>

build() {
  arch-meson build $pkgname-$pkgver
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  depends+=(
    glew libGLEW.so
    jack libjack.so
  )

  meson install -C build --destdir "$pkgdir"
  install -vDm 644 $pkgname-$pkgver/{ChangeLog,README.md} -t "$pkgdir/usr/share/doc/$pkgname/"
}
